# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Francois Charette <firmicus@gmx.net>

pkgname=perl-www-mechanize
pkgver=2.17
pkgrel=1
pkgdesc="Automates web page form & link interaction"
arch=(any)
url="https://search.cpan.org/dist/WWW-Mechanize"
license=('GPL' 'PerlArtistic')
depends=('perl-libwww' 'perl-html-parser' 'perl-uri' 'perl-http-response-encoding'
	 'perl-http-server-simple' 'perl-test-warn' 'perl-html-form')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/S/SI/SIMBABQUE/WWW-Mechanize-$pkgver.tar.gz")
sha256sums=('9c02003e84621dea12c980c4101e79e4f8cae4e382cd3da239faa8bd198f063a')

build() {
  cd  "$srcdir"/WWW-Mechanize-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  "$srcdir"/WWW-Mechanize-$pkgver
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
